﻿namespace ProjectIndieFarm
{
    public class PowerUpGroupRipeCount
    {
        public static void Setup(IPowerUpSystem system)
        {
            var ripeCount1 = system.Add(new PowerUp()
                .SetKey("plant_ripe_count_lv1")
                .SetTitle("产量提升Lv1")
                .SetPrice(2000)
                .SetDescription("提升农作物产量，植物成熟时最大结果数量+1")
                .OnUnlock(self =>
                {
                    Global.PlantRipeCountMaxAddition += 1;
                    self.SendMessageWithEffect("植物成熟时最大结果数量+1");
                }));
            var ripeCount2 = system.Add(new PowerUp()
                .SetKey("plant_ripe_count_lv2")
                .SetTitle("产量提升Lv2")
                .SetPrice(5000)
                .SetDescription("提升农作物产量，植物成熟时最小结果数量+1")
                .ShowCondition(_ => ripeCount1.Unlocked)
                .OnUnlock(self =>
                {
                    Global.PlantRipeCountMinAddition += 1;
                    self.SendMessageWithEffect("植物成熟时最小结果数量+1");
                }));
            var ripeCount3 = system.Add(new PowerUp()
                .SetKey("plant_ripe_count_lv3")
                .SetTitle("产量提升Lv3")
                .SetPrice(8000)
                .SetDescription("提升农作物产量，植物成熟时最大结果数量+1")
                .ShowCondition(_ => ripeCount2.Unlocked)
                .OnUnlock(self =>
                {
                    Global.PlantRipeCountMaxAddition += 1;
                    self.SendMessageWithEffect("植物成熟时最大结果数量+1");
                }));
            var ripeCount4 = system.Add(new PowerUp()
                .SetKey("plant_ripe_count_lv4")
                .SetTitle("产量提升Lv4")
                .SetPrice(12000)
                .SetDescription("提升农作物产量，植物成熟时最小结果数量+1")
                .ShowCondition(_ => ripeCount3.Unlocked)
                .OnUnlock(self =>
                {
                    Global.PlantRipeCountMinAddition += 1;
                    self.SendMessageWithEffect("植物成熟时最小结果数量+1");
                }));

        }
    }
}
